package com.excel.manager.utils;

import java.text.ParseException;
import java.text.SimpleDateFormat;

public class Utils {

    private static final SimpleDateFormat SIMPLE_DATE_FORMAT = new SimpleDateFormat("dd/mm/yyyy");

    public static boolean isEmptyOrNull(Object string) {
        return (string == null || string.toString().trim().isEmpty());
    }

    public static String formatDate(String date) throws ParseException {
        return (SIMPLE_DATE_FORMAT.format(SIMPLE_DATE_FORMAT.parse(date.split("\\s+")[0])));
    }

}
